Welcome Guest, you are in: Login
CTS Futures

Page History: AutoOCO Order

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2013/02/27 10:57


An AutoOCO (Automatic One Cancels Other) consists of three component: a trigger order and the two components of a traditional OCO order. When the Trigger component is filled, the OCO components (consisting of a Limit order and a Stop order) is submitted.

For the OCO, the Limit order price is entered as a differential value (delta) from the traded price of the Trigger component. Likewise, the Stop order price is entered as a differential value (delta) from the traded price of the Trigger component but in the opposite direction (StopPrice = -LimitPrice). When one component of the OCO gets filled the other is cancelled. If one is partially filled then the volume on the other is reduced accordingly.

An AutoOCO Order is submitted with the New Order List (Tag 35=E) message.

Following are the most relevant tags to build an AutoOCO order.

Tag 1385=2ContingencyTypeSpecifier of AutoOCO order type
Tag XXXTriggerPriceLimit Price at which the OCO order is activated
Tag 44PricePrice of Limit component of OCO. Must be entered as a differential value from the expected Trigger Trade price. May be negative but in the opposite direction of Stop Price.
Tag 99Stop PricePrice of Stop component of OCO. Must be entered as a differential value from the expected Trigger Trade price. May be negative but in the opposite direction of Limit Price.
Tag 48SecurityIDMarket for which the order is sent
Tag 55SymbolContract for which the order is sent
Tag 200SecurityExchangeExchange for which the order is sent
Tag 167SecurityTypeSecurity Type (e.g. Futures) of this specific market

Please note:
Volumes for the two OCO orders should be specified as 0. The system works out what the volumes need to be based on the trigger order.
Prices for the two OCO orders are specified as a differential from the fill price of the trigger order. This allows not knowing what price the trigger order will fill at, for example, if you use a market order, or even a Trailing StopMarket, as the trigger order.

The Trigger order can be any order type, including Activation, Stop and Trailing Stop. OCO's orders can also be GTC's, StopLimit or Trailing. Activation is not supported with the OCO components. Please note that OCO's are not intended to be used where both orders are very close together, for example at consecutive prices or at the best bid and best offer prices. For this scenario, it is likely that both components would get filled in an active market

Sample

In this example, a buy OCO order is submitted at the Limit Component Price of 149650 (Tag 44 =149650) with a Stop Component Price of 149675 (Tag 99 = 149675). The Limit component is filled and subsequently the Stop component is canceled.

OCO Order
>> 2/27/2013 10:12:46 AM   [FIXNEWORDERLIST] 34=33|49=T4Test|56=test|50=Ernesto|52=20130227-16:12:46.045|66=fnl-634975567660459833|433=1|1385=1|1=ernesto|48=CME_20130300_ESH3|55=ES|207=CME_Eq|167=FUT|68=2|11=oco-1-634975567660459833|54=1|38=1|40=2|44=149650|59=0|21=2|60=20130227-16:12:46.045|11=oco-2-634975567660459833|54=1|38=1|40=3|99=149675|59=0|21=2|60=20130227-16:12:46.045|
[FIXNEWORDERLIST]
[MsgSeqNum] 34 = 33
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SenderSubID] 50 = Ernesto
[SendingTime] 52 = 20130227-16:12:46.045
[ListID] 66 = fnl-634975567660459833
[ListExecInstType] 433 = 1 (IMMEDIATE)
[ContingencyType] 1385 = 1 (OCO)
[Account] 1 = ernesto
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[SecurityType] 167 = FUT (FUTURE)
[TotNoOrders] 68 = 2
[ClOrdID] 11 = oco-1-634975567660459833
[Side] 54 = 1 (BUY)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 149650
[TimeInForce] 59 = 0 (DAY)
[HandlInst] 21 = 2 (AUTOMATED_EXECUTION_ORDER_PUBLIC_BROKER_INTERVENTION_OK)
[TransactTime] 60 = 20130227-16:12:46.045
[ClOrdID] 11 = oco-2-634975567660459833
[Side] 54 = 1 (BUY)
[OrderQty] 38 = 1
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 149675
[TimeInForce] 59 = 0 (DAY)
[HandlInst] 21 = 2 (AUTOMATED_EXECUTION_ORDER_PUBLIC_BROKER_INTERVENTION_OK)
[TransactTime] 60 = 20130227-16:12:46.045

OCO Order Response - Limit Component Working
<< 2/27/2013 10:12:46 AM  [fixexecutionreport] 34=2152|49=test|56=T4Test|50=T4FIX|52=20130227-16:12:46.077|143=US,IL|1=ernesto|11=oco-1-634975567660459833|17=48058.6420786800_ESH3.6349755676940600006.1.5BE2E64A|150=0|37=5BE2E64A-00C0-49BE-8A32-F248179A0AF8|39=0|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=1|40=2|44=149650|60=20130227-16:12:49.406|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 2152
[SenderCompID] 49 = test
[TargetCompID] 56 = T4Test
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130227-16:12:46.077
[TargetLocationID] 143 = US,IL
[Account] 1 = ernesto
[ClOrdID] 11 = oco-1-634975567660459833
[ExecID] 17 = 48058.6420786800_ESH3.6349755676940600006.1.5BE2E64A
[ExecType] 150 = 0 (NEW)
[OrderID] 37 = 5BE2E64A-00C0-49BE-8A32-F248179A0AF8
[OrdStatus] 39 = 0 (NEW)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 149650
[TransactTime] 60 = 20130227-16:12:49.406
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Working
<< 2/27/2013 10:12:46 AM  [fixexecutionreport] 34=2155|49=test|56=T4Test|50=T4FIX|52=20130227-16:12:46.279|143=US,IL|1=ernesto|11=oco-2-634975567660459833|17=48059.6420786801_ESH3.6349755676941100006.1.E49007D9|150=0|37=E49007D9-CB6A-4382-AF92-B7264A9C6B54|39=0|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=1|40=3|99=149675|60=20130227-16:12:49.411|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 2155
[SenderCompID] 49 = test
[TargetCompID] 56 = T4Test
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130227-16:12:46.279
[TargetLocationID] 143 = US,IL
[Account] 1 = ernesto
[ClOrdID] 11 = oco-2-634975567660459833
[ExecID] 17 = 48059.6420786801_ESH3.6349755676941100006.1.E49007D9
[ExecType] 150 = 0 (NEW)
[OrderID] 37 = E49007D9-CB6A-4382-AF92-B7264A9C6B54
[OrdStatus] 39 = 0 (NEW)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 149675
[TransactTime] 60 = 20130227-16:12:49.411
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Limit Component is filled
<< 2/27/2013 10:13:14 AM  [fixexecutionreport] 34=2192|49=test|56=T4Test|50=T4FIX|52=20130227-16:13:14.812|143=US,IL|1=ernesto|11=oco-1-634975567660459833|17=64205:2032716TN0021888.63497556798136000021.2.5BE2E64A|150=F|37=5BE2E64A-00C0-49BE-8A32-F248179A0AF8|39=2|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=1|40=2|44=149650|31=149650|32=1|14=1|151=0|60=20130227-16:13:18.114|21=1|204=0|337=TRADE|375=CME000A|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 2192
[SenderCompID] 49 = test
[TargetCompID] 56 = T4Test
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130227-16:13:14.812
[TargetLocationID] 143 = US,IL
[Account] 1 = ernesto
[ClOrdID] 11 = oco-1-634975567660459833
[ExecID] 17 = 64205:2032716TN0021888.63497556798136000021.2.5BE2E64A
[ExecType] 150 = F
[OrderID] 37 = 5BE2E64A-00C0-49BE-8A32-F248179A0AF8
[OrdStatus] 39 = 2 (FILLED)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 149650
[LastPx] 31 = 149650
[LastShares] 32 = 1
[CumQty] 14 = 1
[LeavesQty] 151 = 0
[TransactTime] 60 = 20130227-16:13:18.114
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContraTrader] 337 = TRADE
[ContraBroker] 375 = CME000A
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Pending Cancel
<< 2/27/2013 10:13:15 AM  [fixexecutionreport] 34=2195|49=test|56=T4Test|50=T4FIX|52=20130227-16:13:15.062|143=US,IL|1=ernesto|11=oco-2-634975567660459833|17=48059.6420786801_ESH3.63497556769411000014.1.E49007D9|150=6|37=E49007D9-CB6A-4382-AF92-B7264A9C6B54|39=6|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=0|40=3|99=149675|58=OCO Pull: PullRiskSuccess. Pull passed risk management|60=20130227-16:12:49.368|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 2195
[SenderCompID] 49 = test
[TargetCompID] 56 = T4Test
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130227-16:13:15.062
[TargetLocationID] 143 = US,IL
[Account] 1 = ernesto
[ClOrdID] 11 = oco-2-634975567660459833
[ExecID] 17 = 48059.6420786801_ESH3.63497556769411000014.1.E49007D9
[ExecType] 150 = 6 (PENDING_CANCEL)
[OrderID] 37 = E49007D9-CB6A-4382-AF92-B7264A9C6B54
[OrdStatus] 39 = 6 (PENDING_CANCEL)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 0
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 149675
[Text] 58 = OCO Pull: PullRiskSuccess. Pull passed risk management
[TransactTime] 60 = 20130227-16:12:49.368
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Pending Cancel (to exchange)
<< 2/27/2013 10:13:15 AM  [fixexecutionreport] 34=2196|49=test|56=T4Test|50=T4FIX|52=20130227-16:13:15.077|143=US,IL|1=ernesto|11=oco-2-634975567660459833|17=48060.6420786801_ESH3.63497556769411000016.1.E49007D9|150=6|37=E49007D9-CB6A-4382-AF92-B7264A9C6B54|39=6|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=0|40=3|99=149675|58=OCO Pull|60=20130227-16:12:49.411|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 2196
[SenderCompID] 49 = test
[TargetCompID] 56 = T4Test
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130227-16:13:15.077
[TargetLocationID] 143 = US,IL
[Account] 1 = ernesto
[ClOrdID] 11 = oco-2-634975567660459833
[ExecID] 17 = 48060.6420786801_ESH3.63497556769411000016.1.E49007D9
[ExecType] 150 = 6 (PENDING_CANCEL)
[OrderID] 37 = E49007D9-CB6A-4382-AF92-B7264A9C6B54
[OrdStatus] 39 = 6 (PENDING_CANCEL)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 0
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 149675
[Text] 58 = OCO Pull
[TransactTime] 60 = 20130227-16:12:49.411
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Canceled
<< 2/27/2013 10:13:15 AM  [fixexecutionreport] 34=2197|49=test|56=T4Test|50=T4FIX|52=20130227-16:13:15.093|143=US,IL|1=ernesto|11=oco-2-634975567660459833|17=48060.6420786801_ESH3.63497556798425000018.2.E49007D9|150=4|37=E49007D9-CB6A-4382-AF92-B7264A9C6B54|39=4|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=0|40=3|99=149675|60=20130227-16:13:18.425|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 2197
[SenderCompID] 49 = test
[TargetCompID] 56 = T4Test
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130227-16:13:15.093
[TargetLocationID] 143 = US,IL
[Account] 1 = ernesto
[ClOrdID] 11 = oco-2-634975567660459833
[ExecID] 17 = 48060.6420786801_ESH3.63497556798425000018.2.E49007D9
[ExecType] 150 = 4 (CANCELED)
[OrderID] 37 = E49007D9-CB6A-4382-AF92-B7264A9C6B54
[OrdStatus] 39 = 4 (CANCELED)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 0
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 149675
[TransactTime] 60 = 20130227-16:13:18.425
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

Further details on the tags used for this order type are described in the dictionary of the New Order List message.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

© 2009-2023 Cunningham Trading Systems LLC All rights reserved.